use crate::{event::Event,};

pub trait Layer : std::any::Any {
    fn begin_frame(&mut self){}
    fn attach(&mut self){}

    fn update(&mut self,dt:f64 );

    fn ui_render(&mut self, _ctx:&mut egui::Context){}

    fn end_frame(&mut self){}
  

    fn detach(&mut self){}

    fn event(&mut self , _event:&mut Box<dyn Event>){}

    fn get_name(&self) -> &'static str;

    fn as_any(&self) -> &dyn std::any::Any;
    fn as_any_mut(&mut self) -> &mut dyn std::any::Any;
}

